use glass_expand::reflect_derive::*;
use proc_macro2::TokenStream;
use quote::quote;
use syn::DeriveInput;
use syn::Result;

pub fn model_expand(input: &mut DeriveInput) -> Result<TokenStream> {
    let impl_generator = ImplGenerator::new(input)?;
    let from_expanded = impl_generator.from_expanded;
    let into_expanded = impl_generator.into_expanded;
    let reflect_expanded = impl_generator.reflect_expanded;
    let tokens = quote! {
        #[cfg(feature = "doc")]
        #from_expanded

        #[cfg(feature = "doc")]
        #into_expanded

        #[cfg(feature = "doc")]
        #reflect_expanded
    };
    Ok(tokens)
}
